<?
ob_start();
session_start();
include("../conf/config.php");
include("../conf/database.php");
include("../conf/tools.php");

$curTime=getIndianDateTime();
$news_id=$_GET["flash_id"];
$mode=$_GET["mode"]; 

foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }

$arr_data["rec_status"]=1;


if($news_id>0){

update_qry("bkitc_flash_news",$arr_data,"flash_id=".$news_id);
qry_data("update bkitc_flash_news set last_updated='".$curTime."' where flash_id=".$news_id);

}
else{

	$news_id=insert_qry("bkitc_flash_news",$arr_data);
	qry_data("update bkitc_flash_news set posted_date='".$curTime."' where flash_id=".$news_id);

}



header("location:edit_flash.php?mode=edit&flash_id=".$news_id);
?>



